package com.example.park2301.register

import androidx.lifecycle.MutableLiveData
import com.example.lib_base.entity.UserBean
import com.example.lib_base.mvvm.BaseViewModel
import com.example.lib_base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class RegisterViewModel @Inject constructor(val apiService: ApiService):BaseViewModel() {
    val registerData =MutableLiveData<UserBean>()
    fun register(username:String,password:String){
        httpRequest({apiService.register(username, password)},registerData::postValue)
    }
}